package person.wend.springbootlearnexample2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import person.wend.springbootlearnexample2.pojo.HelloWordReqDTO;

@RestController
public class HelloWordController {

    /**
     * 测试接口
     *
     * @return
     */
    @GetMapping("/hello")
    public String hello() {
        return "Hello World!";
    }


    /**
     * 测试接口
     *
     * @return
     */
    @GetMapping("/hello/params")
    public String helloParams(@RequestBody HelloWordReqDTO helloWordReqDTO) {
        System.out.println(helloWordReqDTO.getName() + helloWordReqDTO.getAge());
        return "Hello World!";
    }

}
